<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人信息</title>
<link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<style type="text/css"></style>
<script type="text/javascript" src="<%=path %>/third/jquery-validation-1.14.0/lib/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/js/common.js"></script>
<script type="text/javascript" src="<%=path %>/third/My97DatePicker/WdatePicker.js"></script> 
<script>
var  _contextPath="<%=path%>";
var  _modulePath=_contextPath+"/sys/";

$(document).ready(function(e) {
    $(".btn").click(function(){
		_sbmForm(_modulePath+"textures_add.action?view=list","");
		});
});

</script>
<!-- 默认选中驾校名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".school").each(function(){//循环获取所有单位编号 
			var schoolId = $(this).attr("value");
			var school = $("#serviceCarschoolId").attr("value");
			if(schoolId == school){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中驾校名称-结束 -->
<!-- 默认选中教练名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".userId").each(function(){//循环获取所有单位编号 
			var userId = $(this).attr("value");
			var user = $("#serviceCarUserId").attr("value");
			if(userId == user){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中教练名称-结束 -->
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/jquery.validate.js"></script>
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script type="text/javascript">
        $(function(){
			
			//如果是新增成功，会返回1，如果是1，则提示保存成功
			if("1" == "${actionState}"){
				alert('保存成功！');
			}
		 	
            $("#commonform").validate({
            
                errorClass: "errorInfo", //默认为错误的样式类为：error
                focusInvalid: false, //当为false时，验证无效时，没有焦点响应  
                onkeyup: false,   
                submitHandler: function(form){   //表单提交句柄,为一回调函数，带一个参数：form   
					checkFrom();
                    form.submit();   //提交表单   
                },   
                rules:{
                   
                    "academyName":{
                        required:true,
                    }
                },
                messages:{
                    
                    "academyName":{
                        required:"必填",
                    }
                  }
            });    
        }); 
        </script>
<script type="text/javascript">
$(function () {
$("#edit").click(function () {
var userId;
userId=$(this).attr("id_Value");
 var url;
url="<%=basePath%>/biz/SysUser_openEditSelf.action?userId="+userId;
window.location.href=url; 
});
});




</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
		    <li><a href="#">首页</a></li>
			<li><a href="#">个人中心</a></li>
			<li><a href="#">个人信息</a></li>
		</ul>
	</div>

	<div class="formbody" id="tab1">

		<div class="formtitle">
			<span>个人信息</span>
		</div>
			<ul class="forminfo">
			<li><label>用户名</label><input name="sysUser.userId" id="sysUser.userId" type="text"  value="${userId}"  disabled="disabled" class="dfinput" /></li>
			<li><label>用户类型</label>
			<c:choose>
				<c:when test="${sysUser.userType == 0}">
				<input name="sysUser.userType" type="text"  value="学生" class="dfinput"  disabled="disabled"/></li>
				</c:when>
			
				<c:when test="${sysUser.userType == 1}">
				<input name="sysUser.userType" type="text"  value="教师" class="dfinput"  disabled="disabled"/></li>
				</c:when>
				
				<c:when test="${sysUser.userType == 9}">
				<input name="sysUser.userType" type="text"  value="超级管理员" class="dfinput"  disabled="disabled"/></li>
				</c:when>
			</c:choose>
			
			
			
			 <li><label>姓名</label><input name="sysUser.userName" id="sysUser.userName" type="text"  value="${sysUser.userName}" class="dfinput" disabled="disabled"/></li>
			 <li><label>性别</label>
 			<c:if test="${sysUser.userSex==2}">
		     <input name="sysUser.userSex" id="sysUser.userSex"  type="text"  value="女" class="dfinput" disabled="disabled"/>
			</c:if>
		     <c:if test="${sysUser.userSex==1}">
		     <input name="sysUser.userSex" id="sysUser.userSex"  type="text"  value="男" class="dfinput" disabled="disabled"/>
			</c:if>
			
			<li><label>学院</label><input name="sysUser.userCollege" id="sysUser.userCollege" type="text" disabled="disabled"  value="${sysUser.userCollege}"  class="dfinput" /></li>
			<li><label>专业</label><input name="sysUser.userMajor" id="sysUser.userMajor" type="text"  disabled="disabled"   value="${sysUser.userMajor}"   class="dfinput" /></li>
			<li><label>班级</label><input name="sysUser.userClass" id="sysUser.userClass" type="text" disabled="disabled"  value="${sysUser.userClass}"  class="dfinput" /></li>
			
			<c:if test="${sysUser.userType != 0}">
			<li><label>研究室</label><input name="sysUser.userStudio" id="sysUser.userStudio" type="text" disabled="disabled" value="${sysUser.userStudio}" class="dfinput" /></li>
			</c:if>
			<c:if test="${userType==0}">
			<li><label>身份证号</label><input name="sysUser.userStuId" id="sysUser.userStuId" type="text" disabled="disabled" value="${sysUser.userStuId}" class="dfinput" /></li>
			</c:if>
			
			<li><label>联系方式</label><input name="sysUser.userPhone" id="sysUser.userPhone" type="text" disabled="disabled" value="${sysUser.userPhone}"    class="dfinput" /></li>

			<li><label>邮箱</label><input name="sysUser.userEmail" id="sysUser.userPhone" type="text" disabled="disabled" value="${sysUser.userEmail}"    class="dfinput" /></li>
		  
			<li> <a href="javascript:;"  id="edit"  id_Value="${userId}"><input type="button" value="修改" class="btn"/></a></li>
			</ul>
			<br/>
			

	</div>

</body>



</html>
